package com.twu.biblioteca;

import java.util.List;

public class BookListingOption implements CustomerOptionHandler{
    private Library library;

    public BookListingOption(Library library) {
        this.library = library;
    }

    public String customerOption() {
        StringBuilder bookList = new StringBuilder();

        List<Book> books = library.getBooks();
        for (Book book : books) {
            bookList.append(book.getBookName()).append("\n");
        }
        return bookList.toString();
    }
}
